package com.tlm.consumer.proxy;

import com.tlm.consumer.UserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "provider")
public interface FeignProxy {
    @GetMapping("testProvider")
    //使用feign传单个参数必须加注解@RequestParam("name")
    public String testProvider(@RequestParam("name") String name);
    @PostMapping("testProviderPost")
    public UserVo testProviderPost(@RequestBody UserVo userVo);
}
